package android.bkav.testing.activity;

import android.app.TabActivity;
import android.bkav.testing.R;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;

public class BNoteActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_LEFT_ICON);
        setContentView(R.layout.tab);
        setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.note_icon);
        
        Resources res = getResources();
        TabHost tabHost = getTabHost();
        Intent intent;
        
        TabHost.TabSpec signInTab = tabHost.newTabSpec("sign_in");
        intent = new Intent(this, SignInTabActivity.class);
        signInTab.setIndicator("Sign In", res.getDrawable(R.drawable.android)).setContent(intent);
        
        TabHost.TabSpec introTab = tabHost.newTabSpec("intro");
        intent = new Intent(this, IntroductionTabActivity.class);
        introTab.setIndicator("Introduction Tab", res.getDrawable(R.drawable.android)).setContent(intent);
        
        tabHost.addTab(signInTab);
        tabHost.addTab(introTab);
        
        tabHost.setCurrentTabByTag("sign_in");
    }
}